package com.cheng.example.book.advise151.chap1;

import java.util.Random;

/**
 * 莫让常量蜕变成变量
 * 常量就是常量，在编译期就必须确定其值
 */
public class Client02 {
    public static void main(String[] args) {
        test02();
    }

    public static void test02() {
        System.out.println("常量会变哦:" + Constant.RAND_CONST);
    }
}

interface Constant {
    public static final int RAND_CONST = new Random().nextInt();
}